*** README File for Chow and Levin (2023),
*** Title: "The Diplomacy of Whataboutism and U.S. Foreign Policy Attitudes", 
*** Forthcoming in International Organization.

*** This file describes an overview of the information for replicating the data, analysis code, 
    variables, and results. 
*** For any questions, please contact Wilfred Chow (wilfred.chow@hku.hk) or Dov Levin (dovlvn@hku.hk).


**********************************
*** LIST OF FILES              ***
**********************************

Data:
main.csv: vignette experiment, US main sample.
followup.csv: vignette experiment, US follow-up sample.
pretest1.csv: first pretest data, US sample.
pretest2.csv: second pretest data, US sample.
open.csv: text data for open comments from US main survey.


Code:
01Chow_Levin_IO_main.do produces Figures 3-4 and 8-9 in the main text
02Chow_Levin_IO_appendix.do produces all analyses in the appendix except for sections A7-A8
03Chow_Levin_IO_mediation.do produces Figure 5 in the main text and the Figures in section A7 of the appendix
04Chow_Levin_IO_stm.do produces Figure 6 in the main text and the Figures and Tables in section A8 in the appendix.


**********************************
*** REPLICATION INSTRUCTIONS   ***
**********************************

We conducted all analyses in Stata 14 and in RStudio 2023.06.02 using R 4.3.1 in Windows 10 Pro.
** Note: When replicating the text analysis in 04Chow_Levin_IO_stm.R, slightly inconsistent results may occur 
  between runs in a Mac OS vs. a Windows OS enviorment. We believe that this issue may perhaps be due to C++ dependencies
  in the R stm package in that situation. For best reproducibility of the text analysis, we recommend running the 
  analysis in a Windows OS enviorment.

1) Extract all files into a directory on your computer. Run do or R script files and note that 
   all files for reproducing figures, tables, etc. will extract into directory.
2) If necessary, install the following packages for Stata: coefplot, estout, tabout, grc1leg2. 
   If necessary, install the following packages for R: mediation, ggplot2, dplyr, ggrepel, stm, 
   stminsights, snowballc, and tm.
4) Run 01Chow_Levin_IO_analysis.do with main.csv and followup.csv to replicate Figures 3, 4, and 8-9.
5) Run 02Chow_Levin_Appendix.do with pretest1.csv, pretest2.csv, main.csv, and followup.csv to 
   replicate Figures and tables in sections A1-A6.
6) Run 03Chow_Levin_IO_mediation.R with main.csv to produce Figure 5 in the main text and figures and tables
   in section A7 in the Appendix.
7) Run 04Chow_Levin_IO_stm.R with open.csv to produce Figure 6 in the main text aand figures and tables
   in section A8 in the Appendix.




*************************************
*** LIST OF VARIABLES for usa.dta ***
*************************************

*** Main Study
id = respondent id

issue = the scenario that respondents read
(1 = election interference, 2 = refugee crisis)

order = the order that respondent's viewed the scenarios
(1 = election first, 2 = refugee first)

approve = 5-pt measure on respondent approval of the U.S. government's behavior
(1 = strongly disagree...5 = strongly agree) 

punish1 = 5-pt measure on respondent support for diplomatic cut-off
(1 = strongly oppose...5 = strongly support) 

punish2 = 5-pt measure on respondent support for sanctions
(1 = strongly oppose...5 = strongly support)
 
appb = binary measure of approval
(0 = not approve or neutral, 1 = approve)

pun1b = binary measure of support for diplomatic cut-offs
(0 = not support or neutral, 1 = support)

pun2b = binary measure of support for diplomatic cut-offs
(0 = not support or neutral, 1 = support)

what = 5 possible target treatment responses
(1 = no comment, 2 = denial, 3 = unrelated, 4 = past, 5 = recent) 

country = the identity of the country being criticized by the US
(1 = russia, 2 = germany, 3 = turkey)

mod1  = 5-pt measure on respondent agreement that US is morally equivalent to target of criticism
(1 = strongly disagree...5 = strongly agree) 

mod2  = 5-pt measure on respondent agreement that US is the best country to police others
(1 = strongly disagree...5 = strongly agree) 

mod3  = 5-pt measure on respondent agreement on US commitment to protect democracy or human rights
(1 = strongly disagree...5 = strongly agree) 

hawkish = a continuous measure of hawkishness using factor analysis 
(-2.73 to 2.1 where higher numbers correspond with greater hawkishness)

female = respondent's most closely identified gender
(1 = female, 0 = male)

income = respondent's household income
(1 = less than 20k, 2 = 20k-40k, 3 = 40k-60k, 4 = 40k-80k, 5 = 80k-100k, 6 = 100k to 120k,
 7 = 120k-150k, 8 = 150k-200k, 9 = 200k or more)

party = respondent's partisan affiliation                         
(1 = independent, 2 = democrat, 3 = republican)

race = respondent's race
(1 = asian/other, 2 = black, 3 = hispanic, 4 = white)

race = respondent's race                            
(1 = asian/other, 2 = black, 3 = hispanic, 4 = white)

hispanic = binary meassure of respondent's identified as hispanic/latino
(0 = non-hispanic, 1 = hispanic-descent)

att1 = respondent's attention level from simple attention test
(1 = high, 0 = low)

ethnic = a continuous measure of ethnocentrism using factor analysis on respondent's ethnic bias
(-3.78 to 1.73 where higher numbers correspond with greater ethnocentrism

age = respondent's age (yrs) broken into ordered categories
(1 = 18-29, 2 = 30-44, 3 = 45-64, 4 = 65 and older)

education = respondent's highest level of education
(1 = high school or less, 2 = some college, 3 = 4-year college, 4 = postgraduate)

college = dummy measure of whether respondent finished 4-year college or higher
(0 = less than 4-year college, 1 = 4-year college or higher)

white = dummy measure of whether respondent is self-identified as white
(0 = not white, 1 = white)

******************************************
*** LIST OF VARIABLES for followup.csv ***
******************************************

*** Main Study
id = respondent identification number

issue = the scenario that respondents read
(1 = election interference, 2 = refugee crisis)

order = the order that respondent's viewed the scenarios
(1 = election first, 2 = refugee first)

approve = 5-pt measure on respondent approval of the U.S. government's behavior
(1 = strongly disagree...5 = strongly agree) 

punish1 = 5-pt measure on respondent support for diplomatic cut-off
(1 = strongly oppose...5 = strongly support) 

punish2 = 5-pt measure on respondent support for sanctions
(1 = strongly oppose...5 = strongly support)
 
appb = binary measure of approval
(0 = not approve or neutral, 1 = approve)

pun1b = binary measure of support for diplomatic cut-offs
(0 = not support or neutral, 1 = support)

pun2b = binary measure of support for diplomatic cut-offs
(0 = not support or neutral, 1 = support)

what = 5 possible target treatment responses
(1 = no comment, 2 = denial, 3 = unrelated, 4 = past, 5 = recent) 

ccode = the identity of the country being criticized by the US
(1 = russia, 2 = germany, 3 = turkey)

mod1  = 5-pt measure on respondent agreement that US is morally equivalent to target of criticism
(1 = strongly disagree...5 = strongly agree) 

mod2  = 5-pt measure on respondent agreement that US is the best country to police others
(1 = strongly disagree...5 = strongly agree) 

mod3  = 5-pt measure on respondent agreement on US commitment to protect democracy or human rights
(1 = strongly disagree...5 = strongly agree) 

hawkish = a continuous measure of hawkishness using factor analysis 
(-2.73 to 2.1 where higher numbers correspond with greater hawkishness)

female = respondent's most closely identified gender
(1 = female, 0 = male)

income = respondent's household income
(1 = less than 20k, 2 = 20k-40k, 3 = 40k-60k, 4 = 40k-80k, 5 = 80k-100k, 6 = 100k to 120k,
 7 = 120k-150k, 8 = 150k-200k, 9 = 200k or more)

party = respondent's partisan affiliation                         
(1 = independent, 2 = democrat, 3 = republican)

race = respondent's race                            
(1 = asian/other, 2 = black, 3 = hispanic, 4 = white)

hispanic = binary meassure of respondent's identified as hispanic/latino
(0 = non-hispanic, 1 = hispanic-descent)

att1 = respondent's attention level from simple attention test
(1 = high, 0 = low)

age = respondent's age (yrs) broken into ordered categories
(1 = 18-29, 2 = 30-44, 3 = 45-64, 4 = 65 and older)

education
(1 = high school or less, 2 = some college, 3 = 4-year college, 4 = postgraduate)

******************************************
*** LIST OF VARIABLES for pretest1.csv ***
******************************************

id = respondent idenfying number

elect = 5-point measure on acceptability of interfering in another country's democratic elections
(1 = never acceptable...5 = always acceptable)

spy =  5-point measure on acceptability of spying on foreign government's to promote US interests
(1 = never acceptable...5 = always acceptable)

hr =  5-point measure on acceptability of using sanctions or military force to prevent human rights violations
(1 = never acceptable...5 = always acceptable)

whataboutism = type of whataboutism
(1 = recent, 2 = past, 3 = unrelated)

country = the identity of the country using whataboutism
(1 = china, 2 = france, 3 = germany, 4 = iran, 5 = russia, 6 = saudi arabia, 7 = turkey)

violation = type of violation 
(1 = espionage against US, 2 = espionage against UK, 3 = human rights violations, 
4 = recent election interference in the US)

domestic = identity of the whataboutist actor
(0 = international actor, 1 = domestic actor)

equal = 5-point measure of respondent agreement to statement that there is no moral 
	equivalence between the us and others
(1 = strongly disagree...5 = strongly agree)

just = 5-point measure of respondent agreement to statement that us criticims is justified
(1 = strongly disagree...5 = strongly agree)

ccode1_1 = 5-point favorability measure for iran
(1 = very unfavorable...5 = very favorable)

ccode1_2 = 5-point favorability measure for germany
(1 = very unfavorable...5 = very favorable)

ccode1_3 = 5-point favorability measure for uk
(1 = very unfavorable...5 = very favorable)

ccode1_4 = 5-point favorability measure for china
(1 = very unfavorable...5 = very favorable)

ccode1_5 = 5-point favorability measure for turkey
(1 = very unfavorable...5 = very favorable)

ccode2_1 = 5-point favorability measure for saudi arabia
(1 = very unfavorable...5 = very favorable)

ccode2_2 = 5-point favorability measure for russia
(1 = very unfavorable...5 = very favorable)

ccode2_3 = 5-point favorability measure for france
(1 = very unfavorable...5 = very favorable)

ccode2_4 = 5-point favorability measure for norway
(1 = very unfavorable...5 = very favorable)

ccode2_5 = 5-point favorability measure for india
(1 = very unfavorable...5 = very favorable)


******************************************
*** LIST OF VARIABLES for pretest2.csv ***
******************************************

id = respondent identifying number

electr = 7-point measure on similarity of US election interference done in last decade with foreign country's meddling in a US ally's elections
(1 = least similar...7 most similar)

elect_coup = 7-point measure on similarity of a military coup done by US with foreign country's meddling in a US ally's elections
(1 = least similar...7 most similar)

electp = 7-point measure on similarity of past election interference done by US with foreign country's meddling in a US ally's elections
(1 = least similar...7 most similar)

elect_tor = 7-point measure on similarity of torture by the US with foreign country's meddling in a US ally's elections
(1 = least similar...7 most similar)

refugeer = 7-point measure on similarity of recent US abuse of refugees by Mexican border with a foreign government's mistreatment of refugees
(1 = least similar...7 most similar)

refugeepast1 = 7-point measure on similarity of US internment of Japanese Americans with a foreign government's mistreatment of refugees
(1 = least similar...7 most similar)

refugeepast2 = 7-point measure on similarity of US deportation of Jewish Americans to Nazi Germany with a foreign government's mistreatment of refugees
(1 = least similar...7 most similar)

refugee_tor = 7-point measure on similarity of torturde conducted by US with a foreign government's mistreatment of refugees
(1 = least similar...7 most similar)

refugee_coup = 7-point measure on similarity of a military coup done by US with a foreign government's mistreatment of refugees
(1 = least similar...7 most similar)

hr = 3-points scale on whether refugee violations constituted a major human rights violation
(1 = yes, 2 = no, 3 = uncertain)

past = relevance of past examples of US interference (select all that apply)
(1 = 1930s, 2 = 1940s, 3 = 1950s, 4 = 1960s, 5 = 1970s, 6 = 1980s, 7 = 1990s, 8 = 2000s, 9 = last decade)


**********************************************
*** LIST OF VARIABLES for open.csv ***
**********************************************
id = respondent identification number

what1 = 5 treatment responses by target in election scenario (string text)
(no comment, denial, unrelated, past, recent) 

what2 = 5 treatment responses by target in refugee scenario (string text)
(no comment, denial, unrelated, past, recent) 

open1 = open response comments from election scenario

open2 = open response comments from election scenario

ccode1 = 3 country treatment on the identity of the criticizing country in election scenario
(1 = russia, 2 = germany, 3 = turkey)

ccode2 = 3 country treatment on the identity of the criticizing country in refugee scenario
(1 = russia, 2 = germany, 3 = turkey)




